home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / libdl / dlclose.z / dlclose
Encoding:
Text File  |  2002-10-03  |  3.7 KB  |  69 lines

  1. dlclose(3c)                                            Last changed: 1-8-99
  2.  
  3.  
  4. NNAAMMEE
  5.      ddllcclloossee - Closes a shared object
  6.  
  7. SSYYNNOOPPSSIISS
  8.      cccc [_f_l_a_g ......]] _f_i_l_e ......  --llcc[[_l_i_b_r_a_r_y ......]]
  9.  
  10.      ##iinncclluuddee <<ddllffccnn..hh>>
  11.  
  12.      iinntt ddllcclloossee((vvooiidd **_h_a_n_d_l_e));;
  13.  
  14. IIMMPPLLEEMMEENNTTAATTIIOONN
  15.      IRIX systems
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.      ddllcclloossee disassociates from the current process a shared object
  19.      previously opened by the ddllooppeenn, ssggiiddllaadddd, or ssggiiddllooppeenn__vveerrssiioonn
  20.      command.  Once an object is closed by ddllcclloossee, its symbols are no
  21.      longer available to ddllssyymm or to the program.  All objects loaded
  22.      automatically as a result of invoking ddllooppeenn on the referenced object
  23.      are also closed (however no object still open as a result of any
  24.      ddllooppeenn, ssggiiddllaadddd, or ssggiiddllooppeenn__vveerrssiioonn command is closed until ddllcclloossee
  25.      has closed the last open _h_a_n_d_l_e.
  26.  
  27.      _h_a_n_d_l_e is the value returned by a previous invocation of ddllooppeenn.
  28.  
  29. RREETTUURRNN VVAALLUUEESS
  30.      If the referenced object was successfully closed, ddllcclloossee returns 0.
  31.      If the object could not be closed, or if _h_a_n_d_l_e does not refer to an
  32.      open object, ddllcclloossee returns a non-0 value.  More detailed diagnostic
  33.      information is available through ddlleerrrroorr.
  34.  
  35. NNOOTTEESS
  36.      A successful invocation of ddllcclloossee does not guarantee that the objects
  37.      associated with _h_a_n_d_l_e are actually removed from the address space of
  38.      the process.  Objects loaded by one invocation of ddllooppeenn can also be
  39.      loaded by another invocation of ddllooppeenn.  The same object can also be
  40.      opened multiple times.  An object is not removed from the address
  41.      space until all references to that object through an explicit ddllooppeenn
  42.      invocation have been closed and all other objects implicitly
  43.      referencing that object have also been closed.
  44.  
  45.      Once an object has been closed by ddllcclloossee, referencing symbols
  46.      contained in that object can cause undefined behavior.
  47.  
  48.      Use of ddllcclloossee on a Dynamic Shared Object (DSO) can cause surprising
  49.      side effects because ddllcclloossee forces many symbol's GOT entries to be
  50.      reset for re-lazy-evaluation.  A result of this is that previously-
  51.      saved (by the program or a DSO) function pointers might hold obsolete
  52.      or incorrect values.
  53.  
  54.      Symbol lookups proceed in order on a linear list, and a DSO is not
  55.      opened twice with the same version number (unless different ddllooppeenn
  56.      paths make the DSO name appear different to the _r_l_d program).  When
  57.      multiple ssggiiddllaadddd commands are executed and an earlier DSO is closed
  58.      by ddllcclloossee, this can change the symbol to which a call is resolved and
  59.      even result in unintentional calls to different routines (with the
  60.      same name) from a single place in the program at different times.  For
  61.      more information, see the NNaammeessppaaccee IIssssuueess section in the ddllooppeenn(3)
  62.      man page.
  63.  
  64. SSEEEE AALLSSOO
  65.      ddlleerrrroorr((33)),, ddllooppeenn((33)),, ssggiiddllooppeenn__vveerrssiioonn((33)),, ssggiiddllaadddd((33)),, ddllssyymm((33)),,
  66.      ddssoo((55))
  67.  
  68.      This man page is available only online.
  69.